<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean"%> 
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
    
    <title>CGProject</title>
    
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">
	<LINK href="../styles/stylewang.css"  type=text/css rel=stylesheet>
	<script language=javascript>
		function selectUser(name){
			var txtarea=parent.document.getElementById("selectedusers");
			txtarea.value+=name+",";
		}
		function selectAll(){
			var names=document.getElementsByName("empName");
			for(var i=0;i<names.length;i++){
				selectUser(names[i].firstChild.nodeValue);
			}
		}
	</script>
  </head>
  
  <body>
  <%
  	HashSet set=(HashSet)request.getAttribute("empNameSet");
  	String name;
   %>
	<table border="0" cellspacing="0" id="bgwin">
		<tr><td id="leftcenter"><input type="button" onClick="selectAll();" value="<bean:message key='selectall'/>"></td></tr>
		<%for(Iterator iter=set.iterator();iter.hasNext();){
			name=(String)iter.next();
		%>
		<tr>
			<td><a name="empName" onClick="selectUser('<%=name %>');" style="cursor:hand"><%=name%></a></td>
		</tr>
		<%} %>
	</table>
	
  </body>
</html>
